
#ifndef __CPP_TEXT_CONVERTUTF_H__
#define __CPP_TEXT_CONVERTUTF_H__

#if PRAGMA_ONCE
#pragma once
#endif

#include <stddef.h>
#include <stdlib.h>

typedef unsigned long   utf32_t;  /* at least 32 bits */
typedef unsigned short  utf16_t;  /* at least 16 bits */
typedef unsigned char   utf8_t;   /* typically 8 bits */

char* g_ucs4_to_utf8(const utf32_t* str, long len, long* items_read, long* items_written);
utf32_t* g_utf8_to_ucs4(const char* str, long len, long* items_read, long* items_written);
char* g_utf16_to_utf8(const utf16_t* str, long len, long* items_read, long* items_written);
utf16_t* g_utf8_to_utf16(const char *str, long len, long* items_read, long* items_written);
utf32_t* g_utf16_to_ucs4(const utf16_t* str, long len, long* items_read, long* items_written);
utf16_t* g_ucs4_to_utf16(const utf32_t* str, long len, long* items_read, long* items_written);

#endif // __CPP_TEXT_CONVERTUTF_H__

